﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<title>Entities</title>
		<link type="text/css" rel="stylesheet" href="bootstrap.min.css" />
	</head>

	<body>
		<div class="document-contents">
			<ul>
				<li>
					<a href="#DocConsiderations">Considerations</a>
				</li>
				<li>
					<a href="#DocSourceCodes">Source codes</a>
				</li>
				<li>
					<a href="#DocContributors">Contributors</a>
				</li>
				<li>
					<a href="#DocContact">Contact</a>
				</li>
			</ul>
			<p>ASP.NET Boilerplate is designed to help us develop applications using the best software design
practices without repeating ourselves. DRY - <strong>Don't Repeat Yourself!</strong> is the key idea behind ASP.NET 
Boilerplate.</p>
			<p>All applications have some common problems and need to some common 
structures. ASP.NET Boilerplate works for small projects to large 
enterprise web applications, providing a qick start, with maintanable code 
bases.</p>
			<h3 id="DocConsiderations">Considerations</h3>
			<p>Keep these concepts in mind while developing with ASP.NET 
Boilerplate.</p>
			<h4>Modularity</h4>
			<p>It should be easy to share <a href="/Pages/Documents/Entities">entities</a>,
				<a href="/Pages/Documents/Repositories">repositories</a>,
				<a href="/Pages/Documents/Application-Services">services</a> and views between 
web applications. They should be packaged into
				<a href="/Pages/Documents/Module-System">modules</a> and can be easily 
distributed (preferred as public/private nuget packages). Modules may depend on 
and use other modules. We should be able to extend models in a module for our 
application needs. </p>
			<p>Modularity provides us with "code re-usability" (DRY!). For example, we may 
develop a 
module that contains user management, role management, login and error 
pages which can be shared by different applications. </p>
			<h4>Best practices</h4>
			<p>An application should be developed using the best software design principles. 
				Using <a href="/Pages/Documents/Dependency-Injection">dependency 
injection</a> is one of the most important subjects in this area. AOP 
(Aspect Oriented Programming) is used where it's needed and possible, especially for
				<a href="http://en.wikipedia.org/wiki/Cross-cutting_concern" target="_blank">
cross-cutting concerns</a>. The application should also correctly use architectural patterns such 
as MVC and MVVM, and it should follow
				<a href="http://en.wikipedia.org/wiki/SOLID_(object-oriented_design)" target="_blank">
SOLID</a> principles</p>
			<p>Following these best practices makes our code-base more understandable and 
extensible. It also prevents us from falling in to common mistakes that have already been experienced 
by other developers.</p>
			<h4>Scalable code base</h4>
			<p>The architecture of an application should provide and enforce a way of keeping 
a maintainable code base. <a href="/Pages/Documents/NLayer-Architecture">
Layering</a> and <a href="/Pages/Documents/Module-System">modularity</a> are the 
main techniques to accomplish that. Following the best practices is important, 
otherwise the application gets complicated when it grows. Many applications have been rewritten
because the code became too unmaintainable.</p>
			<h4>Libraries &amp; Frameworks</h4>
			<p>An application should use and combine useful libraries &amp; frameworks to 
accomplish well-known tasks. It should not try to re-invent the wheel if an 
existing tool meets it's requirements, and it should focus on it's own job (to 
it's own business logic) as much as possible. The application may use
				<a href="/Pages/Documents/EntityFramework-Integration">EntityFramework</a> or
				<a href="/Pages/Documents/NHibernate-Integration">NHibernate</a> for 
Object-Relational Mapping, and it may also use
				<a href="https://angularjs.org/" target="_blank">AngularJs</a> or
				<a href="http://durandaljs.com/" target="_blank">DurandalJs</a> as a Single-Page 
Application framework.</p>
			<p>Like it or not, we need to learn many different tools to build 
an application,&nbsp;even if it's more complicated on the client side. There are many  
libraries (thousands of jQuery plug-ins for instance) and frameworks, so  
we should carefully choose our libraries and adapt them for our application.</p>
			<p>ASP.NET Boilerplates composes and combines some of the best tools out there, but it also does not prevent you from using your own favourite tools.</p>
			<h4>Cross-cutting concerns</h4>
			<p>Authorization, <a href="/Pages/Documents/Validating-Data-Transfer-Objects">
validation</a>, <a href="/Pages/Documents/Handling-Exceptions">error handling</a>, 
				<a href="/Pages/Documents/Logging">logging</a>, caching are common things all 
applications implement at some level. The code should be generic and shared 
by different applications. It should also be seperated from the business logic code 
and should be automated as much as possible. This allows us to focus more on our 
application specific business logic and prevents us from re-coding the same stuff 
over and over again (DRY!).</p>

			<h4>More automation</h4>
			<p>If it can be automated, it should be automated (at least in most cases). 
Database migrations, unit tests, and deployments are some of the tasks that can be 
automated. Automation saves us time in a long term and 
prevents from making mistakes of manual tasks (DRY!). </p>

			<h4>Convention over configuration</h4>
			<p>
				<a href="http://en.wikipedia.org/wiki/Convention_over_configuration" target="_blank">
Convention over configuration</a> is a very popular software design principle. An application 
framework should implement defaults as much as possible. It should be easy when 
following conventions but also configurable when needed.</p>

			<h4>Project startup</h4>
			<p>It should be easy and fast to start a new application. We should not repeat 
some tedious steps to create an empty application (DRY!). A Project/Solution
				<a href="/Templates">templates</a> is a proper way of doing it.</p>

			<h3 id="DocSourceCodes">Source code</h3>
			<p>ASP.NET Boilerplate is an open source project developed under Github.</p>
			<ul>
				<li>Source code: <a href="https://github.com/aspnetboilerplate/aspnetboilerplate">https://github.com/aspnetboilerplate/aspnetboilerplate</a>
				</li>
				<li>Project templates: <a href="https://github.com/aspnetboilerplate/aspnetboilerplate-templates">https://github.com/aspnetboilerplate/aspnetboilerplate-templates</a>
				</li>
				<li>Sample projects: <a href="https://github.com/aspnetboilerplate/aspnetboilerplate-samples">https://github.com/aspnetboilerplate/aspnetboilerplate-samples</a>
				</li>
				<li>Module-Zero: <a href="https://github.com/aspnetboilerplate/module-zero">https://github.com/aspnetboilerplate/module-zero</a>
				</li>
			</ul>
			<h3 id="DocContributors">Contributors</h3>
			<p>ASP.NET Boilerplate is designed and developed by <a href="http://www.halilibrahimkalkan.com/" target="_blank">Halil İbrahim 
Kalkan</a>. There are also many 
				<a href="https://github.com/aspnetboilerplate/aspnetboilerplate/graphs/contributors" target="_blank">
contributors</a> on github. Please feel free to fork our repositories and send pull 
requests!</p>

			<h3 id="DocContact">Contact</h3>
			<p>For your questions and other discussions, use
				<a href="http://forum.aspnetboilerplate.com/">official forum</a>.</p>
			<p>For feature requests or bug reports, use
				<a href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues">Github 
issues</a>.</p>
			<p>For personal contact with me, visit my
				<a href="http://halilibrahimkalkan.com/contact/">web page</a>.</p>
		</div>
	</body>
</html>
